﻿/// <reference path="../shareButtons/shareButtons.js" />
/// <reference path="../QUnit/qunit-1.11.0.js" />

module("shareButtons.addFBShareButton");

test("is facebook share button appended", function () {
    // initialize container
    var buttonsContainer = $("#shareButtons");
    buttonsContainer.empty();

    shareButtons.addFBShareButton("#shareButtons");

    equal(buttonsContainer.length, 1);
});

test("is facebook share button image loaded", function () {
    // initialize container
    var buttonsContainer = $("#shareButtons");
    buttonsContainer.empty();

    shareButtons.addFBShareButton("#shareButtons");

    var actualImgPath = $("a img").attr("src");
    var expectedImgPath = "../images/fb-share.png"

    equal(actualImgPath, expectedImgPath);
});

module("shareButtons.addTweetButton");

test("is twitter tweet button appended", function () {
    // initialize container
    var buttonsContainer = $("#shareButtons");
    buttonsContainer.empty();

    shareButtons.addTweetButton("#shareButtons");

    equal(buttonsContainer.length, 1);
});